import { get, post, put, remove } from "./index";

export function oneById(id) {
  return get("child/" + id);
}

export function list(query) {
  return get("child", query);
}

export function excel(query) {
  return post("child/export", query);
}

export function init(data) {
  return post("child/init", data);
}

export function create(data) {
  return post("child", data);
}

export function update(data) {
  return put("child", data);
}

export function deleteById(id) {
  return remove("child/" + id);
}

export default {
  oneById,
  list,
  excel,
  init,
  create,
  update,
  deleteById,
};
